#ifndef __ATTRIBUTE_H_
#define __ATTRIBUTE_H_

#include <stdio.h>

enum Type {Int, Double, String};

#ifndef PAGESIZE
//#define PAGESIZE 8192
#define PAGESIZE 131072
#endif /* PAGESIZE */

class Attribute {

private:

        char *data;
        int len;

public:

	Attribute ();
	~Attribute ();

	// these are some "extra" functions that I wrote to load/unload an attribute
	// they are pretty self-explanatory.  The only thing to be careful about is GetString,
	// which actually resutrs a COPY of the data in the attribute.  So you actually have to
	// deallocate the memory that it returns to you
	void LoadInt (int loadMe);
	void LoadDouble (double loadMe);
	void LoadString (char *loadMe);
	int GetInt ();
	double GetDouble ();
	char *GetString ();

	// gets the length of the attribute
	int GetLength ();

	// these are just like described in the assignment
	int ToBinary (char *here);
	int FromBinary (char *here);

};



#endif /* __ATTRIBUTE_H_ */
